<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
showMenu($menus);
?>
<div class="tt">文件管理</div>
<table cellpadding="2" cellspacing="1" class="tb">
    <tr>
        <th>文件名</th>
        <th width="150">版本号</th>
        <th width="80">文件大小</th>
        <th width="130">修改时间</th>
        <th width="50">属性</th>
    </tr>
	<?php foreach ($allVersions as $k => $v) { ?>
    <tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
        <td align="left">
	        <a href="javascript:void(0);"><img src="admin/image/css.gif" width="16" height="16" alt="" align="absmiddle"/></a>
	        <a href="javascript:void(0);"><?php echo $v['filename'];?>?v=<?php echo $v['version'];?></a>
        </td>
        <td><input type="text" style="width:130px;" value="<?php echo $v['version'];?>" onblur="updateVersion('<?php echo $v['fileid'];?>', this.value);"/></td>
        <td><?php echo $v['filesize'];?> Kb</td>
        <td><?php echo $v['mtime'];?></td>
        <td><?php echo $v['mod'];?></td>
    </tr>
	<?php }?>
</table>
<script type="text/javascript">
    function updateVersion(fileid, version) {
        makeRequest('file=<?php echo $file;?>&dir=<?php echo $dir;?>&action=updateVersion&fileid=' + fileid + '&version=' + version+'&type=<?php echo str_replace('static:', '', $type);?>', '?', '_version');
    }
    function _version() {
        if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
            if (xmlHttp.responseText) showmsg('<?php echo str_replace('static:', '', $type);?>版本修改成功');
        }
    }
</script>
<script>
	xdMenuOn('Tab_<?php echo str_replace('static:', '', $type);?>');
</script>
<?php include tpl('footer'); ?>